package com.huaixia18.systemnotice.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.huaixia18.systemnotice.domain.PrivateMessage;

import java.util.List;

public interface PrivateMessageMapper extends BaseMapper<PrivateMessage> {

    // 根据recipientId和state查询私信
    List<PrivateMessage> findByRecipientIdAndState(Long recipientId, boolean state);

    // 根据senderId和recipientId查询私信
    List<PrivateMessage> findBySenderIdAndRecipientId(Long senderId, Long recipientId);

}
